<!-- Page body -->
<div id="page-body" class="homepage wrapper">
    <div id="find-office">
        <span class="title museo bold white">Office Locator</span><br/>
        <div id="searchform-office">
            <form action="" id="search-form">
                <input id="search" type="text" name="name" value="" onblur="setField(this)" onfocus="clearField(this)" placeholder="Enter suburb or postcode"></input>
                <input type="hidden" name="keyword" id="keyword" value=""/>
                <div id="results"></div>
                <input type="image" name="search" value="Locate" src="<?php echo base_url(); ?>img/office-submit-button.png" />
            </form>
        </div>
        <?php echo anchor('offices/find', '> SHOW ALL OFFICES', 'class="cap bold showmore" '); ?>
    </div>
    <div class="clearfix" id="national-office">
        <!-- Title -->
        <h2 class="capitalize">National Support Office</h2>
        <span>2/34 Navigator Place</span><br>
        <span>Hendra Queensland 4011</span><br>
        <strong>Phone:</strong> (07) 3633 6900<br>
    </div>

    <ol class="offices">
        <?php if (empty($office)) { ?>
            <li class="clearfix heading">
                <h2>Go Gecko in QLD</h2>
            </li>
            <hr/>
            <?php if (!empty($franchiseQLD)) { ?>
                <?php $totalQld = count($franchiseQLD); ?>
                <?php foreach ($franchiseQLD as $key => $franchise) { ?>
                    <li class="clearfix" id="listing-<?php echo $franchise->id ?>">
                        <a href="<?php echo site_url('offices/office/' . $franchise->id) ?>" class="title"><h2 class="gogecko-orange capitalize"><?php echo $franchise->name ?></h2></a>
                        <?php echo $franchise->location_addr_street1 ?>
                        <br/><?php echo $franchise->location_addr_suburb . ' ' . $franchise->location_addr_state . ' ' . $franchise->location_addr_pcode ?>
                        <br/><strong>Phone: </strong><?php echo $franchise->phone ?>
                    </li>
                    <hr/>

                <?php } ?>
            <?php } ?>

            <li class="clearfix heading">
                <h2>Go Gecko in NSW</h2>
            </li>
            <hr/>

            <?php if (!empty($franchiseNSW)) { ?>
                <?php $totalQld = count($franchiseNSW); ?>
                <?php foreach ($franchiseNSW as $key => $franchise) { ?>
                    <li class="clearfix" id="listing-<?php echo $franchise->id ?>">
                        <a href="<?php echo site_url('offices/office/' . $franchise->id) ?>" class="title"><h2 class="gogecko-orange capitalize"><?php echo $franchise->name ?></h2></a>
                        <?php echo $franchise->location_addr_street1 ?>
                        <br/><?php echo $franchise->location_addr_suburb . ' ' . $franchise->location_addr_state . ' ' . $franchise->location_addr_pcode ?>
                        <br/><strong>Phone: </strong><?php echo $franchise->phone ?>
                    </li>
                <?php } ?>
            <?php } ?>
            <li class="clearfix heading">
                <h2>Go Gecko in SA</h2>
            </li>
            <hr/>
            <?php if (!empty($franchiseSA)) { ?>
                <?php $totalQld = count($franchiseSA); ?>
                <?php foreach ($franchiseSA as $key => $franchise) { ?>
                    <li class="clearfix" id="listing-<?php echo $franchise->id ?>">
                        <a href="<?php echo site_url('offices/office/' . $franchise->id) ?>" class="title"><h2 class="gogecko-orange capitalize"><?php echo $franchise->name ?></h2></a>
                        <?php echo $franchise->location_addr_street1 ?>
                        <br/><?php echo $franchise->location_addr_suburb . ' ' . $franchise->location_addr_state . ' ' . $franchise->location_addr_pcode ?>
                        <br/><strong>Phone: </strong><?php echo $franchise->phone ?>
                    </li>
                <?php } ?>
            <?php } ?>
        <?php } else { ?>
            <hr/>
            <div class="clearfix" id="national-office">
                <!-- Title -->
                <a href="<?php echo site_url('offices/office/' . $office->id) ?>" class="title"><h2 class="gogecko-orange capitalize"><?php echo $office->name ?></h2></a>                
                <span><?php echo $office->location_addr_street1 ?></span><br>
                <span><?php echo $office->location_addr_suburb . ' ' . $office->location_addr_state . ' ' . $office->location_addr_pcode ?></span><br>
                <strong>Phone:</strong> <?php echo $office->phone ?><br>
            </div>

        <?php } ?>


    </ol>

</div>